﻿using System;
using System.Collections.Generic;
using System.Linq;
using MartinRL.ProjectEuler.Sequences;

namespace MartinRL.ProjectEuler
{
    /// <summary>
    /// http://projecteuler.net/index.php?section=problems&id=24
    /// </summary>
    public static class Problem024
    {
        public static IEnumerable<int> FindTheMillionthLexicographicPermutationOfTheDigits0123456789()
        {
            return new Permutations<int>(new List<int> {0, 1, 2, 3, 4, 5, 6, 7, 8, 9})
                .ElementAt(1000000 - 1);
        }
    }
}